# Maintainer: Jerome Leclanche <jerome@leclan.ch>
# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>

pkgname=lxqt-panel
pkgver=1.4.0
pkgrel=1
pkgdesc="The LXQt desktop panel"
arch=("loong64" "x86_64")
groups=("lxqt")
url="https://github.com/lxqt/$pkgname"
license=("LGPL2.1")
depends=(
	"libdbusmenu-qt5" "libxcomposite" "lxqt-menu-data" "libxtst"
	"lxqt-globalkeys" "solid5" "libxcb" "libQt5Xdg.so"
)
optdepends=(
	"libpulse: Volume control plugin"
	"alsa-lib: Volume control plugin"
	"libstatgrab: CPU monitor and Network monitor plugins"
	"libsysstat: System Statistics plugin"
	"lm_sensors: Sensors plugin"
)
makedepends=(
	"lxqt-build-tools" "liblxqt" "libpulse" "libstatgrab" "libsysstat"
	"lm_sensors" "libxdamage" "alsa-lib"
)
source=(
	"https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc}
)
sha256sums=('0e660c0397c96a28f0fcf316b20c72d203c85793a884e1487b3b14e3790defc9'
            'SKIP')
validpgpkeys=(
	"169704C6FB490C6892C7F23C37E0AF1FDA48F373"  # Jerome Leclanche <jerome@leclan.ch>
	"7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3"  # Alf Gaida <agaida@siduction.org>
	"19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
	cmake -B build -S "$srcdir/$pkgname-$pkgver" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None
	make -C build
}

package() {
	cd build
	make DESTDIR="$pkgdir" install
}
